package handler.accountFormHandlers;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import builder.FormBuilder;
import builder.FormDirector;
import builder.AccountFormBuilderPackage.AccountFormBuilder;
import builder.AccountFormBuilderPackage.LoginDecorator;
import builder.AccountFormBuilderPackage.OtherInfoDecorator;
import builder.AccountFormBuilderPackage.RegisterDecorator;
import other.AssetRegistryFrame;
import form.FormInputComponent;

public class LoginRegisterButtonActionListener implements ActionListener {

	FormInputComponent component;

	public void setAssetFormInputComponent(FormInputComponent component){
		this.component = component;
	}
	
	public void actionPerformed(ActionEvent e) {

		FormBuilder registerbuilder = new AccountFormBuilder();
		registerbuilder = new OtherInfoDecorator(registerbuilder);
		registerbuilder = new RegisterDecorator(registerbuilder);
		FormDirector registerdirector = new FormDirector(registerbuilder);
		registerdirector.construct();
		
		AssetRegistryFrame.getARFrame().changePanel(registerdirector.getForm());
		
	}

}
